import React from 'react';
import { Link } from 'react-router-dom';
import historyMethod from 'shared/utils/historyMethod';
import { testGet, testPost, testPut } from 'shared/api';
import './index.less';

export default class Home extends React.PureComponent {
  componentDidMount() {
    // historyMethod.push('/about')
    testGet({ a: 'test' }).then((res) => {
      console.log(res);
      return res;
    });

    testPost({ a: 'testPost' }).then((res) => {
      console.log(res);
    });


    testPut({ id: '3232' }, { name: 'yang', age: 23 }).then((res) => {
      console.log(res);
    });
  }

  render() {
    return (
      <div className="test">
        <Link to="/about">个人页面</Link>
        测试数据
      </div>
    );
  }
}
